@import '../../styles/var.scss';

$item-size: 144px;

.m-upload {
  width: 100%;

  &-content {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
  }

  &-item {
    flex-shrink: 0;
    position: relative;
    width: $item-size;
    height: $item-size;
    border: 2px solid $border-color-base;
    border-radius: 8px;
    overflow: hidden;

    &-img {
      width: 100%;
      height: 100%;
    }

    &-media {
      width: 100%;
      height: 100%;
    }

    &-icon {
      position: absolute;
      right: 0;
      top: 0;
      display: flex;
      justify-content: center;
      align-items: center;
      width: 32px;
      height: 32px;
      border-radius: 0 0 0 32px;
      background-color: rgba(0, 0, 0, 0.8);
      z-index: 9;

      &-close {
        position: absolute;
        right: 4px;
        top: 4px;
        color: #fff;
      }
    }
  }

  &-btn {
    flex-shrink: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    width: $item-size;
    height: $item-size;
    border: 2px dashed $border-color-base;
    border-radius: 8px;

    &-content {
      display: flex;
      flex-direction: column;
      justify-content: center;
      align-items: center;
      gap: 8px;
    }

    &-icon {
      color: $text-color-secondary;
    }

    &-placeholder {
      font-size: $font-size-small;
      color: $text-color-secondary;
      text-align: center;
    }
  }

  &-extra {
    flex: 1;
  }
}
